VERSION 5.00
Begin VB.Form frmRecent 
   BackColor       =   &H0099BABD&
   BorderStyle     =   4  'Fixed ToolWindow
   Caption         =   "TorrenTV - Recently Processed Torrents"
   ClientHeight    =   3675
   ClientLeft      =   9990
   ClientTop       =   5985
   ClientWidth     =   7620
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3675
   ScaleWidth      =   7620
   ShowInTaskbar   =   0   'False
   Visible         =   0   'False
   Begin VB.ListBox lst 
      BackColor       =   &H0099BABD&
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   2985
      ItemData        =   "frmRecent.frx":0000
      Left            =   150
      List            =   "frmRecent.frx":0031
      MultiSelect     =   2  'Extended
      TabIndex        =   0
      Top             =   120
      Width           =   7320
   End
   Begin VB.Label lblClear 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      Caption         =   "CLEAR"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   15.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   375
      Left            =   4560
      TabIndex        =   3
      ToolTipText     =   "Clear recent history (Permanent)."
      Top             =   3150
      Width           =   2055
   End
   Begin VB.Label lblOK 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      Caption         =   "OKAY"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   15.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   375
      Left            =   1920
      TabIndex        =   1
      ToolTipText     =   "Go back to the main screen."
      Top             =   3150
      Width           =   2055
   End
   Begin VB.Label lblOK2 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      Caption         =   "OKAY"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   15.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00808080&
      Height          =   375
      Left            =   1980
      TabIndex        =   2
      Top             =   3210
      Width           =   2055
   End
   Begin VB.Label lblClear2 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      Caption         =   "CLEAR"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   15.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00808080&
      Height          =   375
      Left            =   4620
      TabIndex        =   4
      Top             =   3210
      Width           =   2055
   End
End
Attribute VB_Name = "frmRecent"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Form_Load()
    Dim s$, i&, sarr$()
    
    lst.Clear
    s$ = frmMain.regGet("recent")
    If s$ <> "" Then
        sarr$() = Split(s$, vbCrLf)
        For i& = UBound(sarr$()) To 0 Step -1
            If sarr$(i&) <> "" Then
                lst.AddItem CStr(lst.ListCount + 1) + ". " + sarr$(i&)
                If lst.ListCount = 15 Then Exit For
            End If
        Next i&
        For i& = 0 To frmMain.C_AMT_TO_SHOW& - 1
            If i& < lst.ListCount Then
                lst.Selected(i&) = True
            End If
        Next i&
    Else
        lst.AddItem "No downloaded torrents.  Add a show and wait to get your first torrent!"
    End If
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Cancel = 0
    Unload Me
End Sub

Private Sub lblOK_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As Single)
    frmMain.ControlMousedown Button, lblOK, lblOK2
End Sub
Private Sub lblOK_MouseMove(Button As Integer, Shift As Integer, x As Single, Y As Single)
    frmMain.ControlMousemove Button, lblOK, lblOK2, x, Y
End Sub
Private Sub lblOK_MouseUp(Button As Integer, Shift As Integer, x As Single, Y As Single)
    If frmMain.ControlMouseup(Button, lblOK, lblOK2) = True Then
        Me.Hide
        Unload Me
    End If
End Sub

Private Sub lblClear_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As Single)
    frmMain.ControlMousedown Button, lblClear, lblClear2
End Sub
Private Sub lblClear_MouseMove(Button As Integer, Shift As Integer, x As Single, Y As Single)
    frmMain.ControlMousemove Button, lblClear, lblClear2, x, Y
End Sub
Private Sub lblClear_MouseUp(Button As Integer, Shift As Integer, x As Single, Y As Single)
    If frmMain.ControlMouseup(Button, lblClear, lblClear2) = True Then
        frmMain.regSet "recent", ""
        lst.Clear
        lst.AddItem "No downloaded torrents.  Add a show and wait to get your first torrent!"
    End If
End Sub

